﻿using System;
using System.Collections.Generic;

namespace BSharp.Compiler
{
	public class ArgumentList : AstNode
	{

		public IEnumerable<AstNode> Arguments {
			get {
				return children;
			}
		}

		private List<AstNode> children = new List<AstNode> ();

		public ArgumentList (SourceLocation location)
			: base (location)
		{
		}

		public void Add (AstNode child)
		{
			children.Add (child);
		}

		public override void Visit (AstVisitor visitor)
		{
			visitor.Accept (this);
		}

		public override void VisitChildren (AstVisitor visitor)
		{
			foreach (AstNode child in children) {
				child.Visit (visitor);
			}
		}
	}
}

